package com.service;

import com.dto.LotteryRecordWithPrizeDto;
import com.entity.LotteryDrawRecord;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @InterfaceName LotteryDrawRecordService
 * @Description 抽奖记录业务层接口
 * @Author Kx
 * @Date 2025/6/18 11:28
 * @Version 1.0
 */
public interface LotteryDrawRecordService {
    /**
     * @author: kx
     * @date: 2025/6/18 11:29
     * @param lotteryDrawRecords : 抽奖记录列表
     * @param address : 收货地址
     * @description: 添加抽奖记录
    */
    void addLotteryDrawRecord(List<LotteryDrawRecord> lotteryDrawRecords, String address);

    /**
     * @author: kx
     * @date: 2025/6/18 19:59
     * @param userId : 用户id
     * @return java.util.List<com.dto.LotteryRecordWithPrizeDto>
     * @description: 根据用户id查询抽奖记录
    */
    List<LotteryRecordWithPrizeDto> findByUserId(Integer userId);

    /**
     * @author: kx
     * @date: 2025/6/18 20:22
     * @param pageNum : 页码
     * @param pageSize : 每页显示数量
     * @return java.util.List<com.github.pagehelper.PageInfo<com.entity.LotteryDrawRecord>>
     * @description: 分页查询所有抽奖记录
    */
    PageInfo<LotteryRecordWithPrizeDto> findPagedAllRecords(Integer pageNum, Integer pageSize);

    /**
     * @author: kx
     * @date: 2025/6/19 11:02
     * @param keyword : 关键字
     * @param pageNum : 页码
     * @param pageSize : 每页数量
     * @return com.github.pagehelper.PageInfo<com.dto.LotteryRecordWithPrizeDto>
     * @description: 根据用户名称模糊分页查询抽奖记录
    */
    PageInfo<LotteryRecordWithPrizeDto> findRecordsByKeyword(String keyword, Integer pageNum, Integer pageSize);
}
